package cn.pop.hsp_system_v2.Service.impl;

import cn.pop.hsp_system_v2.Mapper.AppointMapper;
import cn.pop.hsp_system_v2.Pojo.*;
import cn.pop.hsp_system_v2.Service.IAppointService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * deleteAppointmentById删除预约
 *      *      *
 *      *      * updatePatientCard更新医保卡
 *      *      * updateAppointment更新预约
 *      *      * updateScheduling更新时间表
 *      *      *
 *      *      * insertAppointment新增预约
 *      *      * insertPatientCard新增医保卡
 *      *      *
 *      *      * selectDoctorById查找医生
 *      *      * selectSchedulingByDoctorId查找时间表
 *      *      * selectPatientCardById查找医保卡
 *      *      *
 *      *      * selectDoctorList查找医生们
 *      *      * selectAppointmentList查找预约表
 *      *      * selectSchedulingList查找时间表
 *      *      * selectPatientCardList查找医保卡表
 */
@Service
public class AppointServiceImpl implements IAppointService
{
    @Autowired
    private AppointMapper appointMapper;

    @Override
    public Doctor selectDoctorById(Long doctor_id) {
        return appointMapper.selectDoctorById(doctor_id);
    }

    @Override
    public Scheduling selectSchedulingByDoctorId(Long doctor_id) {
        return appointMapper.selectSchedulingByDoctorId(doctor_id);
    }

    @Override
    public PatientCard selectPatientCardById(Long uuid) {
        return appointMapper.selectPatientCardById(uuid);
    }

    @Override
    public List<Doctor> selectDoctorList(Doctor doctor) {
        return appointMapper.selectDoctorList(doctor);
    }

    @Override
    public List<Appointment> selectAppointmentList(Appointment appointment) {
        return appointMapper.selectAppointmentList(appointment);
    }

    @Override
    public List<Scheduling> selectSchedulingList(Scheduling scheduling) {
        return appointMapper.selectSchedulingList(scheduling);
    }

    @Override
    public List<PatientCard> selectPatientCardList(PatientCard patientCard) {
        return appointMapper.selectPatientCardList(patientCard);
    }

    @Override
    public int insertAppointment(Appointment appointment) {
        return appointMapper.insertAppointment(appointment);
    }

    @Override
    public int insertPatientCard(PatientCard patientCard) {
        return appointMapper.insertPatientCard(patientCard);
    }

    @Override
    public int updatePatientCard(PatientCard patientCard) {
        return appointMapper.updatePatientCard(patientCard);
    }

    @Override
    public int updateAppointment(Appointment appointment) {
        return appointMapper.updateAppointment(appointment);
    }

    @Override
    public int updateScheduling(Scheduling scheduling) {
        return appointMapper.updateScheduling(scheduling);
    }

    @Override
    public int deleteAppointmentById(Long uuid) {
        return appointMapper.deleteAppointmentById(uuid);
    }
}
